inherited fmTabels_ON: TfmTabels_ON
  Left = 329
  Top = 210
  Width = 805
  Height = 426
  Caption = #1058#1072#1073#1077#1083#1080
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 365
    Width = 797
  end
  inherited Panel1: TPanel
    Width = 797
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 627
    end
    inherited BitBtn2: TBitBtn
      Left = 715
    end
  end
  object dbgTabel: TcxGrid [2]
    Left = 0
    Top = 77
    Width = 797
    Height = 288
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 2
    LookAndFeel.Kind = lfStandard
    object tvTabel: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.Insert.Visible = True
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = True
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      OnCellDblClick = tvTabelCellDblClick
      DataController.DataSource = dlgDS
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skCount
          FieldName = 'PID'
        end>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.CellEndEllipsis = True
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.CellTextMaxLineCount = 1
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      OptionsView.HeaderEndEllipsis = True
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Header = DMInv.cxSiniyText
      object tvTabelTABID: TcxGridDBColumn
        Caption = #8470' '#1089#1082#1074#1079#1085
        DataBinding.FieldName = 'TABID'
        Width = 60
      end
      object tvTabelTABDATABEGIN: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
        DataBinding.FieldName = 'TABDATABEGIN'
        Width = 134
      end
      object tvTabelTABDATAEND: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1086#1082#1086#1085#1095'.'
        DataBinding.FieldName = 'TABDATAEND'
        Width = 119
      end
      object tvTabelTABAMOUNT: TcxGridDBColumn
        Caption = #1057#1091#1084#1084#1072
        DataBinding.FieldName = 'TABAMOUNT'
        Width = 111
      end
      object tvTabelTABNOTE: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
        DataBinding.FieldName = 'TABNOTE'
        Width = 107
      end
      object tvTabelTABUSERENTER: TcxGridDBColumn
        Caption = #1040#1074#1090#1086#1088
        DataBinding.FieldName = 'TABUSERENTER'
        Width = 116
      end
      object tvTabelTABTIMEENTER: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1074#1074#1086#1076#1072
        DataBinding.FieldName = 'TABTIMEENTER'
        Width = 134
      end
    end
    object cxGridLevel2: TcxGridLevel
      GridView = tvTabel
    end
  end
  object ToolBar2: TToolBar [3]
    Left = 0
    Top = 45
    Width = 797
    AutoSize = True
    BorderWidth = 2
    EdgeInner = esNone
    EdgeOuter = esNone
    Images = DMInv.ilActive
    TabOrder = 3
    TabStop = True
    Transparent = True
    object tbAddT: TToolButton
      Left = 0
      Top = 2
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1090#1072#1073#1077#1083#1100
      ImageIndex = 30
      ParentShowHint = False
      ShowHint = True
      OnClick = tbAddTClick
    end
    object tbView: TToolButton
      Left = 23
      Top = 2
      Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1085#1080#1077
      Caption = 'tbView'
      ImageIndex = 7
      ParentShowHint = False
      ShowHint = True
      OnClick = tbViewClick
    end
    object tbDelT: TToolButton
      Left = 46
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1090#1072#1073#1077#1083#1100
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDelTClick
    end
    object tbOplatitTabel: TToolButton
      Left = 69
      Top = 2
      Hint = #1054#1087#1083#1072#1090#1080#1090#1100' '#1090#1072#1073#1077#1083#1100
      Caption = 'tbOplatitTabel'
      ImageIndex = 42
      ParentShowHint = False
      ShowHint = True
      Visible = False
      OnClick = tbOplatitTabelClick
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qT
  end
  object qT: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qTAfterInsert
    CachedUpdates = True
    SQL.Strings = (
      'SELECT t.*'
      'FROM TABEL_ON t'
      'order by t.tabdatabegin')
    UpdateObject = quT
    GeneratorField.Field = 'TABID'
    GeneratorField.Generator = 'GEN_TABEL_ON_ID'
    Left = 296
    Top = 8
    object qTTABID: TIntegerField
      FieldName = 'TABID'
      Origin = '"TABEL"."TABID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qTPID: TIntegerField
      FieldName = 'PID'
      Origin = '"TABEL"."PID"'
    end
    object qTTABDATABEGIN: TDateField
      FieldName = 'TABDATABEGIN'
      Origin = '"TABEL"."TABDATABEGIN"'
    end
    object qTTABDATAEND: TDateField
      FieldName = 'TABDATAEND'
      Origin = '"TABEL"."TABDATAEND"'
    end
    object qTTABAMOUNT: TIBBCDField
      FieldName = 'TABAMOUNT'
      Origin = '"TABEL"."TABAMOUNT"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qTTABNOTE: TIBStringField
      FieldName = 'TABNOTE'
      Origin = '"TABEL"."TABNOTE"'
      Size = 255
    end
    object qTTABUSERENTER: TIBStringField
      FieldName = 'TABUSERENTER'
      Origin = '"TABEL"."TABUSERENTER"'
      Size = 40
    end
    object qTTABTIMEENTER: TDateTimeField
      FieldName = 'TABTIMEENTER'
      Origin = '"TABEL"."TABTIMEENTER"'
    end
    object qTTABUSEREDIT: TIBStringField
      FieldName = 'TABUSEREDIT'
      Origin = '"TABEL"."TABUSEREDIT"'
      Size = 40
    end
    object qTTABTIMEEDIT: TDateTimeField
      FieldName = 'TABTIMEEDIT'
      Origin = '"TABEL"."TABTIMEEDIT"'
    end
  end
  object quT: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      'from TABEL_ON '
      'where'
      '  TABID = :TABID')
    ModifySQL.Strings = (
      'update TABEL_ON'
      'set'
      '  PID = :PID,'
      '  TABAMOUNT = :TABAMOUNT,'
      '  TABDATABEGIN = :TABDATABEGIN,'
      '  TABDATAEND = :TABDATAEND,'
      '  TABID = :TABID,'
      '  TABNOTE = :TABNOTE'
      'where'
      '  TABID = :OLD_TABID')
    InsertSQL.Strings = (
      'insert into TABEL_ON'
      '  (PID, TABAMOUNT, TABDATABEGIN, TABDATAEND, TABID, TABNOTE)'
      'values'
      
        '  (:PID, :TABAMOUNT, :TABDATABEGIN, :TABDATAEND, :TABID, :TABNOT' +
        'E)')
    DeleteSQL.Strings = (
      'delete from TABEL_ON'
      'where'
      '  TABID = :OLD_TABID')
    Left = 328
    Top = 8
  end
  object qCheck: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT FIRST 1 n.ONID'
      'FROM TABEL_ON ton'
      
        'INNER JOIN OFFICIAL_NOTE n ON n.ONDATE BETWEEN ton.TABDATABEGIN ' +
        'AND ton.TABDATAEND'
      'WHERE ton.TABID = :tabid'
      'AND n.ONISVYPLACHENO IS NOT NULL and n.ONISOK = 1')
    Left = 296
    Top = 45
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'tabid'
        ParamType = ptUnknown
      end>
  end
  object sqlUpdate: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'UPDATE OFFICIAL_NOTE N'
      'SET N.ONISVYPLACHENO = 1'
      
        'WHERE N.ONDATE BETWEEN :data1 AND :data2 AND N.ONISVYPLACHENO IS' +
        ' NULL and n.ONISOK = 1')
    Transaction = DMInv.IBTransaction1
    Left = 96
    Top = 16
  end
end
